<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

/**
 * 
 *
 * @property int $id
 * @property int $task_id 主任务ID
 * @property int $account_id 微信账号id
 * @property string $title 查询名称
 * @property string|null $nickname 昵称
 * @property int $status 状态 1正常 0禁用 2进行中 3完成 4异常
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask query()
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereAccountId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereNickname($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereQueryName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereTaskId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereUpdatedAt($value)
 * @property string|null $time 时间
 * @property-read \App\Models\Task|null $task
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Subtask whereTitle($value)
 * @mixin \Eloquent
 */
class Subtask extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'subtask';

    public function task()
    {
        return $this->hasOne(Task::class,'id','task_id');
    }

}
